package cn.edu.gdpt.mobile213.mobile2121606097wjc0511;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class MainActivity extends AppCompatActivity {
    private EditText edtTxtMainUserName;
    private EditText edtTxtMainPassword;
    private EditText edtTxtMainPassword2;
    private EditText edtTxtMainCall;
    private EditText edtTxtMainEmail;
    private EditText edtTxtMainText;
    private Button btnMainRegister;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
        btnMainRegister.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent=new Intent(MainActivity.this,ShowDataActivity.class);
                intent.putExtra("userName",edtTxtMainUserName.getText().toString().trim());
                Bundle bundle=new Bundle();
                bundle.putString("call",edtTxtMainCall.getText().toString().trim());
                Bundle bundle1=new Bundle();
                bundle1.putString("Email",edtTxtMainEmail.getText().toString().trim());
                Bundle bundle2=new Bundle();
                bundle2.putString("Text",edtTxtMainText.getText().toString().trim());
                startActivity(intent);
            }
        });
    }

    private void initView() {
        edtTxtMainUserName=(EditText) findViewById(R.id.edtTxtMainUserName);
        edtTxtMainPassword=(EditText) findViewById(R.id.edtTxtMainPassword);
        edtTxtMainPassword2=(EditText) findViewById(R.id.edtTxtMainPassword2);
        edtTxtMainCall=(EditText) findViewById(R.id.edtTxtMainCall);
        edtTxtMainEmail=(EditText) findViewById(R.id.edtTxtMainEmail);
        edtTxtMainText=(EditText) findViewById(R.id.edtTxtMainText);
        btnMainRegister=(Button) findViewById(R.id.btnMainRegister);
    }
}